//调用接口配置文件
import { request } from 'config/request'

// 获取省市区
export async function queryAllAddress(params) {
	return request({
		url: 'admin/address/queryAllAddress',
		method: 'GET',
		data: params,
	});
};

// 获取市对应的楼盘
export async function getCityEstateList(params) {
	return request({
		url: 'admin/estate/adminList',
		method: 'POST',
		data: params,
	});
};


// 获取礼品详情
export async function getGiftDetail(params) {
	return request({
		url: `admin/gift/detail/${params}`,
		method: 'GET',
		// data: params,
	});
};

//楼盘列表
export async function houseListGet(params) {
	return request({
		url: 'admin/estate/adminList',
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
  };

  //新增礼品
export async function addGift(params) {
    return request({
        url: 'admin/gift/create',
        method: 'POST',
        headers:{
            "content-type":'application/json'
        },
        data: params,
    });
};
  //编辑礼品
  export async function editGift(params) {
    return request({
        url: 'admin/gift/update',
        method: 'POST',
        headers:{
            "content-type":'application/json'
        },
        data: params,
    });
};
